package com.cskaoyan.service;

import com.cskaoyan.bean.Admin;
import com.cskaoyan.bean.basebean.BaseParam;
import com.cskaoyan.bean.sysmanage.*;
import com.cskaoyan.exception.MarketException;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface AdminService {
    //查询页面信息
    AdminPageData query(String username, BaseParam baseParam);

    OptionsVo queryAllRole();

    StorageVo addStorage(MultipartFile file) throws MarketException;

    boolean queryAdminByUserName(String username);

    boolean addAdmin(AddAdminBo addAdminBo);

    Admin queryAdminById(Integer id);

    boolean updateAdmin(UpdateAdminBo updateAdminBo);

    boolean deleteAdmin(Integer id);

    List<Admin> selectAdminByRolesId(Integer id);

    String selectPwdByName(String username);

    List<String> selectSysPermissionByUserName(String username);

    Admin selectAdminByUsername(String username);

    List<String> selectRolesByUsername(String username);

    List<String> selectPermissionById(Integer id);

    void updateAdminLastLoginIp(Integer id, String remoteAddr);
}
